//
//  ExercisePickerView.h
//  Water
//
//  Created by yh on 2018/1/16.
//  Copyright © 2018年 chenguibang. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NSString *(^ExercisePickerViewTitleBlock)(NSInteger index ,id dataItem);
typedef void(^ExercisePickerViewResultBlock)(NSInteger index ,id dataItem);

@interface ExercisePickerView : UIView<UIPickerViewDelegate,UIPickerViewDataSource>
@property (weak, nonatomic) IBOutlet UIPickerView *picker;
@property (weak, nonatomic) IBOutlet UIButton *cancelBtn;
@property (weak, nonatomic) IBOutlet UIButton *sureBtn;

@property (nonatomic, strong) NSArray* datas;
@property (nonatomic ,copy) ExercisePickerViewTitleBlock exercisePickerViewTitleBlock;
@property (nonatomic ,copy) ExercisePickerViewResultBlock exercisePickerViewResultBlock;

- (void)pickWithData:(NSArray *)data titleBlock:(ExercisePickerViewTitleBlock)titleBlock resultBlock:(ExercisePickerViewResultBlock)resultBlock at:(UIViewController *)controller;

@end
